﻿namespace DimensionsHelper.LanguageService.Syntax;

public class MacroArgument : PreNodeList
{
    internal MacroArgument(SourceNode? parent) :
        base(parent, SyntaxKinds.MacroArgument)
    {
    }


    /// <summary>
    ///     参数后紧跟的逗号。如果此参数是最后一个，此属性是<see langword="null" />。
    /// </summary>
    public SourceNode? TrailingCommaToken { get; private set; }


    public MacroArgument Update(SourceNode commaToken)
    {
        TrailingCommaToken = commaToken;
        return this;
    }
}


public static partial class NodeFactory
{
    public static MacroArgument CreateMacroArgument(SourceNode? parent)
    {
        return new MacroArgument(parent);
    }
}